package cn.wolfcode.trip.web.controller;


import cn.wolfcode.trip.domain.Travel;
import cn.wolfcode.trip.service.ITravelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author jobob
 * @since 2021-09-11
 */
@RestController
@RequestMapping("/trip/travel")
public class TravelController {
    @Autowired
    ITravelService travelService;
    @GetMapping("list")
    public List<Travel> list() {
        List<Travel> list = travelService.list();
        return list;
    }
}
